<!doctype html>
<html lang="ru" data-bs-theme="dark">

<head>
    <!-- 2024-05-11 14:17:47 -->
        <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Git - gitsubmodules</title>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/css/bootstrap.min.css" integrity="sha512-jnSuA4Ss2PkkikSOLtYs8BlYIeeIK1h99ty4YfvRPAlzr377vr3CXDb7sb7eEEBYjDtcYj+AjBH3FLv5uSJuXg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" integrity="sha512-rO+olRTkcf304DQBxSWxln8JXCzTHlKnIdnMUwYvQa9/Jd4cQaNkItIUj6Z4nvW1dqK0SKXLbn9h4KwZTNtAyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/7.1.0/css/flag-icons.min.css" integrity="sha512-bZBu2H0+FGFz/stDN/L0k8J0G8qVsAL0ht1qg5kTwtAheiXwiRKyCq1frwfbSFSJN3jooR5kauE0YjtPzhZtJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link href="../../../runebook.css" rel="stylesheet" type="text/css">
    <meta name="x-github" content="https://github.com/runebookdev/runebook">
            <meta name="x-i18n-doc" content="git">
        <script>
        function i18n(element) {
            // NOP
        }
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.js" integrity="sha512-F/dia2jKME12jwqiYDayeD+Rr/8jTWUD2wfbuJB0bzSwenSEnXsn4qQ/wVyXUCix5bmCAj8xJdtFr2OqUtjLAw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js" integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js" integrity="sha512-D9LDs8YUUVa4V9Gl4Zb+xqRAc7RCzooR3+zzebgK2RMu/KU+dh90pbjEEMzPiSyRSGbSp9j1pZnrO4joGa5WEg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="sha512-mhbv5DqBMgrWL+32MmsDOt/OAvqr/cHimk6B8y/bx/xS88MVkYGPiVv2ixKVrkywF2qHplNRUvFsAHUdxZ3Krg==" crossorigin="anonymous"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6424571640879890" crossorigin="anonymous"></script>    <script async src="https://www.googletagmanager.com/gtag/js?id=G-3G5BZ1QEDP"></script>
<script>
    window.dataLayer = window.dataLayer || [];

    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-3G5BZ1QEDP');
</script>    <script>
(function(c, l, a, r, i, t, y) {
    c[a] = c[a] || function() {
        (c[a].q = c[a].q || []).push(arguments)
    };
    t = l.createElement(r);
    t.async = 1;
    t.src = "https://www.clarity.ms/tag/" + i + "?ref=bwt";
    y = l.getElementsByTagName(r)[0];
    y.parentNode.insertBefore(t, y);
})(window, document, "clarity", "script", "jto2hd94r9");
</script>    <script src="../../../theme.js"></script>
</head>

<body>
    <header class="bg-black">
        <div class="container">
            <div class="row">
                <div class="col">
                    <nav class="navbar navbar-expand-lg navbar-dark">
                        <a class="navbar-brand fw-bold" href="https://runebook.dev/ru">
                            <img alt="Runebook.dev" class="d-inline-block align-top mr-1" src="../../../assets/runebook_logo.webp" width="24" height="24">
                            Runebook.dev
                        </a>
                        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                            <span class="navbar-toggler-icon"></span>
                        </button>
                        <div class="collapse navbar-collapse" id="navbarSupportedContent">
                            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/ru#docs">Documentation</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://runebook.dev/contributors">Contributors</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="https://github.com/runebookdev/runebook/issues">GitHub</a>
                                </li>
                            </ul>
                                                                                                <button class="btn btn-success ms-2" id="showPopupButton">
                                        <i class="bi bi-translate"></i>
                                        Show English
                                    </button>
                                                                                        <div class="form-check form-switch ms-3">
                                <label class="text-light">
                                    <input class="form-check-input" type="checkbox" role="switch" id="theme-switch" checked>
                                    <i class="bi bi-moon-stars-fill"></i>
                                </label>
                            </div>
                        </div>
                    </nav>
                </div>
            </div>
        </div>
    </header>

    <!--sse-->
    <div class="container">
    <div class="row">
        <div class="col">
            <nav aria-label="breadcrumb" class="mt-2">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item">
                        <a href="https://runebook.dev/ru#docs">
                            <span class="fi fi-ru"></span>                            Русский                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <a href="-index-.html">
                            Git                            2.43                        </a>
                    </li>
                                            <li class="breadcrumb-item">
                            <a href="-index-.html#Guides">
                                Guides                            </a>
                        </li>
                                    </ol>
            </nav>
        </div>
    </div>
    <br>

    <div class="row">
        <div class="col-md-9">
            <main>
                <article>

                    
                    <h1 class="text-body-emphasis" ><span data-i18n="000e32a72ea3fa3d38decd83a4118c48b3bdbc7323fd45e3afcd13bb6710dea8/53" data-source="gitsubmodules" onmousemove="i18n(this)">gitsubmodules</span></h1> <h2 class="text-body-emphasis"  id="_name"><span data-i18n="dcd1d5223f73b3a965c07e3ff5dbee3eedcfedb806686a05b9b3868a2c3d6d50/3a" data-source="Name" onmousemove="i18n(this)">Name</span></h2> <div> <p><span data-i18n="ba36cd3b9883289eee5ac8e95425dd84a131b3233cabc104e982cfa8df80c658/79" data-source="gitsubmodules - Mounting one repository inside another" onmousemove="i18n(this)">gitsubmodules &mdash; &mcy;&ocy;&ncy;&tcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; &ocy;&dcy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy;</span></p> </div> <h2 class="text-body-emphasis"  id="_synopsis"><span data-i18n="8eb3755381519d7f0479d75446e56e20084834c0460d7ec94926932372ea6c47/0d" data-source="Synopsis" onmousemove="i18n(this)">Synopsis</span></h2> <div> <div> <div> <pre class="hljs language-bash">.gitmodules, <span class="hljs-variable">$GIT_DIR</span>/config</pre> </div> </div> <div> <div> <pre class="hljs language-bash">git submodule
git &lt;<span class="hljs-built_in">command</span>&gt; --recurse-submodules</pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_description"><span data-i18n="526e0087cc3f254d9f86f6c7d8e23d954c4dfda2b312efc29194ae8a860106ba/d3" data-source="Description" onmousemove="i18n(this)">Description</span></h2> <div> <p><span data-i18n="d9ca7072a33f5638337348fa34ce6a7d37f69adaf8e6b09992daf3d3b751f5d1/79" data-source="A submodule is a repository embedded inside another repository. The submodule has its own history; the repository it is embedded in is called a superproject." onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &mdash; &ecy;&tcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &vcy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy;&ncy;&ycy;&jcy; &vcy; &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;. &Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &icy;&mcy;&iecy;&iecy;&tcy; &scy;&vcy;&ocy;&yucy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy;; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&jcy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ocy;&ncy; &vcy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy;, &ncy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;&scy;&yacy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&ocy;&mcy;.</span></p> <p><span data-i18n="f323fe573724da1d6c0770275126ce52829eb896cf92e36c78579397b23fbf53/7a" data-source="On the filesystem, a submodule usually (but not always - see FORMS below) consists of (i) a Git directory located under the &lt;code&gt;$GIT_DIR/modules/&lt;/code&gt; directory of its superproject, (ii) a working directory inside the superproject&amp;rsquo;s working directory, and a &lt;code&gt;.git&lt;/code&gt; file at the root of the submodule&amp;rsquo;s working directory pointing to (i)." onmousemove="i18n(this)">&Vcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;&ocy;&jcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; (&ncy;&ocy; &ncy;&iecy; &vcy;&scy;&iecy;&gcy;&dcy;&acy; &mdash; &scy;&mcy;. FORMS &ncy;&icy;&zhcy;&iecy;) &scy;&ocy;&scy;&tcy;&ocy;&icy;&tcy; &icy;&zcy; (i) &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;  Git , &rcy;&acy;&scy;&pcy;&ocy;&lcy;&ocy;&zhcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &vcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy;  <code>$GIT_DIR/modules/</code>  &iecy;&gcy;&ocy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, (ii) &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &icy; &fcy;&acy;&jcy;&lcy;&acy;  <code>.git</code>  &pcy;&ocy; &acy;&dcy;&rcy;&iecy;&scy;&ucy; &kcy;&ocy;&rcy;&iecy;&ncy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;, &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&shchcy;&icy;&jcy; &ncy;&acy; (i).</span></p> <p><span data-i18n="5259189d7087ab8406b908711c5ab550dca834628b2841244b70925dead585a9/8d" data-source="Assuming the submodule has a Git directory at &lt;code&gt;$GIT_DIR/modules/foo/&lt;/code&gt; and a working directory at &lt;code&gt;path/to/bar/&lt;/code&gt;, the superproject tracks the submodule via a &lt;code&gt;gitlink&lt;/code&gt; entry in the tree at &lt;code&gt;path/to/bar&lt;/code&gt; and an entry in its &lt;code&gt;.gitmodules&lt;/code&gt; file (see &lt;a href=&quot;gitmodules&quot;&gt;gitmodules[5]&lt;/a&gt;) of the form &lt;code&gt;submodule.foo.path = path/to/bar&lt;/code&gt;." onmousemove="i18n(this)">&Pcy;&rcy;&iecy;&dcy;&pcy;&ocy;&lcy;&acy;&gcy;&acy;&yacy;, &chcy;&tcy;&ocy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &icy;&mcy;&iecy;&iecy;&tcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &pcy;&ocy; &acy;&dcy;&rcy;&iecy;&scy;&ucy;  <code>$GIT_DIR/modules/foo/</code>  &icy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &pcy;&ocy; &acy;&dcy;&rcy;&iecy;&scy;&ucy;  <code>path/to/bar/</code> , &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&iecy;&tcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &chcy;&iecy;&rcy;&iecy;&zcy; &zcy;&acy;&pcy;&icy;&scy;&softcy;  <code>gitlink</code>  &vcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy; &pcy;&ocy; &acy;&dcy;&rcy;&iecy;&scy;&ucy;  <code>path/to/bar</code>  &icy; &zcy;&acy;&pcy;&icy;&scy;&softcy; &vcy; &iecy;&gcy;&ocy; &fcy;&acy;&jcy;&lcy;&iecy;  <code>.gitmodules</code>  (&scy;&mcy;.  <a href="gitmodules.html">gitmodules[5]</a> ) &fcy;&ocy;&rcy;&mcy;&ycy;  <code>submodule.foo.path = path/to/bar</code> .</span></p> <p><span data-i18n="dbff61be2e85ef55cff50ffc60e5da1c96c7dfcc296030f2328c7d9b345fe93e/cf" data-source="The &lt;code&gt;gitlink&lt;/code&gt; entry contains the object name of the commit that the superproject expects the submodule&amp;rsquo;s working directory to be at." onmousemove="i18n(this)">&Zcy;&acy;&pcy;&icy;&scy;&softcy;  <code>gitlink</code>  &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&icy;&tcy; &icy;&mcy;&yacy; &ocy;&bcy;&hardcy;&iecy;&kcy;&tcy;&acy; &fcy;&icy;&kcy;&scy;&acy;&tscy;&icy;&icy;, &vcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ocy;&mcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &ocy;&zhcy;&icy;&dcy;&acy;&iecy;&tcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&softcy;&scy;&yacy; &vcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> <p><span data-i18n="1bf48100e4dbede8f3bf5c451dd70833549450e7d4c3e52b1366b72a8bd1f14e/51" data-source="The section &lt;code&gt;submodule.foo.*&lt;/code&gt; in the &lt;code&gt;.gitmodules&lt;/code&gt; file gives additional hints to Git&amp;rsquo;s porcelain layer. For example, the &lt;code&gt;submodule.foo.url&lt;/code&gt; setting specifies where to obtain the submodule." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&dcy;&iecy;&lcy;  <code>submodule.foo.*</code>  &vcy; &fcy;&acy;&jcy;&lcy;&iecy;  <code>.gitmodules</code>  &dcy;&acy;&iecy;&tcy; &dcy;&ocy;&pcy;&ocy;&lcy;&ncy;&icy;&tcy;&iecy;&lcy;&softcy;&ncy;&ycy;&iecy; &scy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&yacy; &ocy; &fcy;&acy;&rcy;&fcy;&ocy;&rcy;&ocy;&vcy;&ocy;&mcy; &scy;&lcy;&ocy;&iecy; Git. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &pcy;&acy;&rcy;&acy;&mcy;&iecy;&tcy;&rcy;  <code>submodule.foo.url</code>  &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;, &gcy;&dcy;&iecy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;.</span></p> <p><span data-i18n="ca915f16c12ae793d666390f4bdab40cdb1f2343b92ac0cac06e2a703e71e919/4c" data-source="Submodules can be used for at least two different use cases:" onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &kcy;&acy;&kcy; &mcy;&icy;&ncy;&icy;&mcy;&ucy;&mcy; &dcy;&lcy;&yacy; &dcy;&vcy;&ucy;&khcy; &rcy;&acy;&zcy;&ncy;&ycy;&khcy; &scy;&lcy;&ucy;&chcy;&acy;&iecy;&vcy;:</span></p> <div> <ol> <li> <p><span data-i18n="571dafec5f9580f4ace26cfcee3cd774571834ac41c1b4f42a941c52e20bb0d6/c0" data-source="Using another project while maintaining independent history. Submodules allow you to contain the working tree of another project within your own working tree while keeping the history of both projects separate. Also, since submodules are fixed to an arbitrary version, the other project can be independently developed without affecting the superproject, allowing the superproject project to fix itself to new versions only when desired." onmousemove="i18n(this)">&Icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &pcy;&rcy;&icy; &scy;&ocy;&khcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&icy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;&jcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy;. &Pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&yucy;&tcy; &vcy;&acy;&mcy; &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&yacy; &pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yucy; &ocy;&bcy;&ocy;&icy;&khcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&ocy;&vcy; &ocy;&tcy;&dcy;&iecy;&lcy;&softcy;&ncy;&ocy;. &Kcy;&rcy;&ocy;&mcy;&iecy; &tcy;&ocy;&gcy;&ocy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &pcy;&rcy;&icy;&vcy;&yacy;&zcy;&acy;&ncy;&ycy; &kcy; &pcy;&rcy;&ocy;&icy;&zcy;&vcy;&ocy;&lcy;&softcy;&ncy;&ocy;&jcy; &vcy;&iecy;&rcy;&scy;&icy;&icy;, &dcy;&rcy;&ucy;&gcy;&ocy;&jcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &mcy;&ocy;&zhcy;&iecy;&tcy; &rcy;&acy;&zcy;&rcy;&acy;&bcy;&acy;&tcy;&ycy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy;, &ncy;&iecy; &zcy;&acy;&tcy;&rcy;&acy;&gcy;&icy;&vcy;&acy;&yacy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;, &chcy;&tcy;&ocy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&ucy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &pcy;&rcy;&icy;&scy;&pcy;&ocy;&scy;&acy;&bcy;&lcy;&icy;&vcy;&acy;&tcy;&softcy;&scy;&yacy; &kcy; &ncy;&ocy;&vcy;&ycy;&mcy; &vcy;&iecy;&rcy;&scy;&icy;&yacy;&mcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &pcy;&rcy;&icy; &zhcy;&iecy;&lcy;&acy;&ncy;&icy;&icy;.</span></p> </li> <li> <p><span data-i18n="755f080dd5360d25636d92fc6d6324d16fb71d3e1f1f3e87911c1e813e9c466a/8b" data-source="Splitting a (logically single) project into multiple repositories and tying them back together. This can be used to overcome current limitations of Git&amp;rsquo;s implementation to have finer grained access:" onmousemove="i18n(this)">&Rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&icy;&iecy; (&lcy;&ocy;&gcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &iecy;&dcy;&icy;&ncy;&ocy;&gcy;&ocy;) &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &ncy;&acy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy; &icy; &icy;&khcy; &ocy;&bcy;&rcy;&acy;&tcy;&ncy;&ocy;&iecy; &scy;&vcy;&yacy;&zcy;&ycy;&vcy;&acy;&ncy;&icy;&iecy;. &Ecy;&tcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &pcy;&rcy;&iecy;&ocy;&dcy;&ocy;&lcy;&iecy;&ncy;&icy;&yacy; &tcy;&iecy;&kcy;&ucy;&shchcy;&icy;&khcy; &ocy;&gcy;&rcy;&acy;&ncy;&icy;&chcy;&iecy;&ncy;&icy;&jcy; &rcy;&iecy;&acy;&lcy;&icy;&zcy;&acy;&tscy;&icy;&icy; Git &icy; &ocy;&bcy;&iecy;&scy;&pcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &bcy;&ocy;&lcy;&iecy;&iecy; &dcy;&iecy;&tcy;&acy;&lcy;&softcy;&ncy;&ocy;&gcy;&ocy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy;:</span></p> <div> <ul> <li> <p><span data-i18n="f2c74ba0f0203381b8577d5638b41daef8ab54d4f14c04816794d28635f06ff1/46" data-source="Size of the Git repository: In its current form Git scales up poorly for large repositories containing content that is not compressed by delta computation between trees. For example, you can use submodules to hold large binary assets and these repositories can be shallowly cloned such that you do not have a large history locally." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&mcy;&iecy;&rcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;  Git . &Vcy; &scy;&vcy;&ocy;&iecy;&jcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &fcy;&ocy;&rcy;&mcy;&iecy;  Git  &pcy;&lcy;&ocy;&khcy;&ocy; &mcy;&acy;&scy;&shcy;&tcy;&acy;&bcy;&icy;&rcy;&ucy;&iecy;&tcy;&scy;&yacy; &dcy;&lcy;&yacy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&khcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&icy;&khcy; &kcy;&ocy;&ncy;&tcy;&iecy;&ncy;&tcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ncy;&iecy; &scy;&zhcy;&icy;&mcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ucy;&tcy;&iecy;&mcy; &dcy;&iecy;&lcy;&softcy;&tcy;&acy;-&vcy;&ycy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&icy;&jcy; &mcy;&iecy;&zhcy;&dcy;&ucy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy;&mcy;&icy;. &Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &dcy;&lcy;&yacy; &khcy;&rcy;&acy;&ncy;&iecy;&ncy;&icy;&yacy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&khcy; &dcy;&vcy;&ocy;&icy;&chcy;&ncy;&ycy;&khcy; &rcy;&iecy;&scy;&ucy;&rcy;&scy;&ocy;&vcy;, &icy; &ecy;&tcy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ncy;&iecy;&gcy;&lcy;&ucy;&bcy;&ocy;&kcy;&ocy; &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &ucy; &vcy;&acy;&scy; &ncy;&iecy; &bcy;&ycy;&lcy;&ocy; &bcy;&ocy;&lcy;&softcy;&shcy;&ocy;&jcy; &lcy;&ocy;&kcy;&acy;&lcy;&softcy;&ncy;&ocy;&jcy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&icy;.</span></p> </li> <li> <p><span data-i18n="de855f29906f334993ea92453ca560329c6e5219a3bb2f11e27637a47778f812/b7" data-source="Transfer size: In its current form Git requires the whole working tree present. It does not allow partial trees to be transferred in fetch or clone. If the project you work on consists of multiple repositories tied together as submodules in a superproject, you can avoid fetching the working trees of the repositories you are not interested in." onmousemove="i18n(this)">&Rcy;&acy;&zcy;&mcy;&iecy;&rcy; &pcy;&iecy;&rcy;&iecy;&dcy;&acy;&chcy;&icy;: &vcy; &scy;&vcy;&ocy;&iecy;&jcy; &tcy;&iecy;&kcy;&ucy;&shchcy;&iecy;&jcy; &fcy;&ocy;&rcy;&mcy;&iecy;  Git  &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy; &ncy;&acy;&lcy;&icy;&chcy;&icy;&yacy; &vcy;&scy;&iecy;&gcy;&ocy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &dcy;&iecy;&rcy;&iecy;&vcy;&acy;. &Ocy;&ncy; &ncy;&iecy; &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&iecy;&tcy; &pcy;&iecy;&rcy;&iecy;&ncy;&ocy;&scy;&icy;&tcy;&softcy; &chcy;&acy;&scy;&tcy;&icy;&chcy;&ncy;&ycy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&yacy; &pcy;&rcy;&icy; &vcy;&ycy;&bcy;&ocy;&rcy;&kcy;&iecy; &icy;&lcy;&icy; &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&icy;. &IEcy;&scy;&lcy;&icy; &pcy;&rcy;&ocy;&iecy;&kcy;&tcy;, &ncy;&acy;&dcy; &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&mcy; &vcy;&ycy; &rcy;&acy;&bcy;&ocy;&tcy;&acy;&iecy;&tcy;&iecy;, &scy;&ocy;&scy;&tcy;&ocy;&icy;&tcy; &icy;&zcy; &ncy;&iecy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&icy;&khcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;, &scy;&vcy;&yacy;&zcy;&acy;&ncy;&ncy;&ycy;&khcy; &vcy;&mcy;&iecy;&scy;&tcy;&iecy; &kcy;&acy;&kcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;, &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &icy;&zcy;&bcy;&iecy;&zhcy;&acy;&tcy;&softcy; &pcy;&ocy;&lcy;&ucy;&chcy;&iecy;&ncy;&icy;&yacy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&khcy; &dcy;&iecy;&rcy;&iecy;&vcy;&softcy;&iecy;&vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &vcy;&acy;&scy; &ncy;&iecy; &icy;&ncy;&tcy;&iecy;&rcy;&iecy;&scy;&ucy;&yucy;&tcy;.</span></p> </li> <li> <p><span data-i18n="979cdd54941d5105a044a23477ec39f61507c2da91416f7f17a920897265b641/a3" data-source="Access control: By restricting user access to submodules, this can be used to implement read/write policies for different users." onmousemove="i18n(this)">&Kcy;&ocy;&ncy;&tcy;&rcy;&ocy;&lcy;&softcy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy;&acy;: &Ocy;&gcy;&rcy;&acy;&ncy;&icy;&chcy;&icy;&vcy;&acy;&yacy; &dcy;&ocy;&scy;&tcy;&ucy;&pcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&iecy;&jcy; &kcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;&mcy;, &mcy;&ocy;&zhcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&softcy; &dcy;&lcy;&yacy; &rcy;&iecy;&acy;&lcy;&icy;&zcy;&acy;&tscy;&icy;&icy; &pcy;&ocy;&lcy;&icy;&tcy;&icy;&kcy; &chcy;&tcy;&iecy;&ncy;&icy;&yacy;/&zcy;&acy;&pcy;&icy;&scy;&icy; &dcy;&lcy;&yacy; &rcy;&acy;&zcy;&ncy;&ycy;&khcy; &pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&tcy;&iecy;&lcy;&iecy;&jcy;.</span></p> </li> </ul> </div> </li> </ol> </div> </div> <h2 class="text-body-emphasis"  id="_the_configuration_of_submodules"><span data-i18n="66f461cdc58472b014d9badc06e800def502f4408a9913af630b985de40fbd75/53" data-source="The configuration of submodules" onmousemove="i18n(this)">&Kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yacy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy;</span></h2> <div> <p><span data-i18n="f1fbffaf586de10dea5ffc060860bbb9b496ac81d6b09f83edf1846853469cbe/2f" data-source="Submodule operations can be configured using the following mechanisms (from highest to lowest precedence):" onmousemove="i18n(this)">&Ocy;&pcy;&iecy;&rcy;&acy;&tscy;&icy;&icy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&icy;&tcy;&softcy; &scy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;&mcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&khcy; &mcy;&iecy;&khcy;&acy;&ncy;&icy;&zcy;&mcy;&ocy;&vcy; (&ocy;&tcy; &vcy;&ycy;&scy;&shcy;&iecy;&gcy;&ocy; &kcy; &ncy;&icy;&zcy;&shcy;&iecy;&mcy;&ucy; &pcy;&rcy;&icy;&ocy;&rcy;&icy;&tcy;&iecy;&tcy;&ucy;):</span></p> <div> <ul> <li> <p><span data-i18n="4a1be087b965b99d5095246fde4fdac0495e029352bd8a529ef70b54b73ab025/54" data-source="The command line for those commands that support taking submodules as part of their pathspecs. Most commands have a boolean flag &lt;code&gt;--recurse-submodules&lt;/code&gt; which specifies whether to recurse into submodules. Examples are &lt;code&gt;grep&lt;/code&gt; and &lt;code&gt;checkout&lt;/code&gt;. Some commands take enums, such as &lt;code&gt;fetch&lt;/code&gt; and &lt;code&gt;push&lt;/code&gt;, where you can specify how submodules are affected." onmousemove="i18n(this)">&Kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ncy;&acy;&yacy; &scy;&tcy;&rcy;&ocy;&kcy;&acy; &dcy;&lcy;&yacy; &tcy;&iecy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&yucy;&tcy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &kcy;&acy;&kcy; &chcy;&acy;&scy;&tcy;&softcy; &icy;&khcy; &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&jcy; &pcy;&ucy;&tcy;&icy;. &Bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&ocy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy; &icy;&mcy;&iecy;&yucy;&tcy; &fcy;&lcy;&acy;&gcy;  boolean   <code>--recurse-submodules</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;, &scy;&lcy;&iecy;&dcy;&ucy;&iecy;&tcy; &lcy;&icy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&khcy;&ocy;&dcy;&icy;&tcy;&softcy; &kcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;&mcy;. &Pcy;&rcy;&icy;&mcy;&iecy;&rcy;&ycy;:  <code>grep</code>  &icy;  <code>checkout</code> . &Ncy;&iecy;&kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&yucy;&tcy; &pcy;&iecy;&rcy;&iecy;&chcy;&icy;&scy;&lcy;&iecy;&ncy;&icy;&yacy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;  <code>fetch</code>  &icy;  <code>push</code> , &gcy;&dcy;&iecy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &kcy;&acy;&kcy; &bcy;&ucy;&dcy;&ucy;&tcy; &zcy;&acy;&tcy;&rcy;&ocy;&ncy;&ucy;&tcy;&ycy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;.</span></p> </li> <li> <p><span data-i18n="2e618c215b0cffe5bb012d74c1320f3ee9eada3372b96f7ac564fc4cb6bba812/90" data-source="The configuration inside the submodule. This includes &lt;code&gt;$GIT_DIR/config&lt;/code&gt; in the submodule, but also settings in the tree such as a &lt;code&gt;.gitattributes&lt;/code&gt; or &lt;code&gt;.gitignore&lt;/code&gt; files that specify behavior of commands inside the submodule." onmousemove="i18n(this)">&Kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yacy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;. &Scy;&yucy;&dcy;&acy; &vcy;&khcy;&ocy;&dcy;&icy;&tcy;  <code>$GIT_DIR/config</code>  &vcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;, &acy; &tcy;&acy;&kcy;&zhcy;&iecy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&jcy;&kcy;&icy; &vcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;, &tcy;&acy;&kcy;&icy;&iecy; &kcy;&acy;&kcy; &fcy;&acy;&jcy;&lcy;&ycy;  <code>.gitattributes</code>  &icy;&lcy;&icy;  <code>.gitignore</code> , &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &ocy;&pcy;&rcy;&iecy;&dcy;&iecy;&lcy;&yacy;&yucy;&tcy; &pcy;&ocy;&vcy;&iecy;&dcy;&iecy;&ncy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> <p><span data-i18n="bcdc6c551d4eab1bc5db2c2153748484908b49384b4259673a57c809e22b8dde/f0" data-source="For example an effect from the submodule&amp;rsquo;s &lt;code&gt;.gitignore&lt;/code&gt; file would be observed when you run &lt;code&gt;git status --ignore-submodules=none&lt;/code&gt; in the superproject. This collects information from the submodule&amp;rsquo;s working directory by running &lt;code&gt;status&lt;/code&gt; in the submodule while paying attention to the &lt;code&gt;.gitignore&lt;/code&gt; file of the submodule." onmousemove="i18n(this)">&Ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &ecy;&fcy;&fcy;&iecy;&kcy;&tcy; &ocy;&tcy; &fcy;&acy;&jcy;&lcy;&acy;  <code>.gitignore</code>  &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &bcy;&ucy;&dcy;&iecy;&tcy; &ncy;&acy;&bcy;&lcy;&yucy;&dcy;&acy;&tcy;&softcy;&scy;&yacy; &pcy;&rcy;&icy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&iecy;  <code>git status --ignore-submodules=none</code>  &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;. &Pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy; &icy;&ncy;&fcy;&ocy;&rcy;&mcy;&acy;&tscy;&icy;&yacy; &icy;&zcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &scy;&ocy;&bcy;&icy;&rcy;&acy;&iecy;&tcy;&scy;&yacy; &pcy;&ucy;&tcy;&iecy;&mcy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&acy;  <code>status</code>  &vcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;, &pcy;&rcy;&icy; &ecy;&tcy;&ocy;&mcy; &ocy;&bcy;&rcy;&acy;&shchcy;&acy;&yacy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy; &ncy;&acy; &fcy;&acy;&jcy;&lcy;  <code>.gitignore</code>  &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> <p><span data-i18n="bd03d2b30e6721bee94b47edf715ac5f5b5793ea469052ef894e0cb5e7341e31/f1" data-source="The submodule&amp;rsquo;s &lt;code&gt;$GIT_DIR/config&lt;/code&gt; file would come into play when running &lt;code&gt;git push --recurse-submodules=check&lt;/code&gt; in the superproject, as this would check if the submodule has any changes not published to any remote. The remotes are configured in the submodule as usual in the &lt;code&gt;$GIT_DIR/config&lt;/code&gt; file." onmousemove="i18n(this)">&Fcy;&acy;&jcy;&lcy;  <code>$GIT_DIR/config</code>  &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &bcy;&ucy;&dcy;&iecy;&tcy; &zcy;&acy;&dcy;&iecy;&jcy;&scy;&tcy;&vcy;&ocy;&vcy;&acy;&ncy; &pcy;&rcy;&icy; &zcy;&acy;&pcy;&ucy;&scy;&kcy;&iecy;  <code>git push --recurse-submodules=check</code>  &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;, &tcy;&acy;&kcy; &kcy;&acy;&kcy; &ecy;&tcy;&ocy; &pcy;&rcy;&ocy;&vcy;&iecy;&rcy;&icy;&tcy;, &iecy;&scy;&tcy;&softcy; &lcy;&icy; &vcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy; &kcy;&acy;&kcy;&icy;&iecy;-&lcy;&icy;&bcy;&ocy; &icy;&zcy;&mcy;&iecy;&ncy;&iecy;&ncy;&icy;&yacy;, &ncy;&iecy; &ocy;&pcy;&ucy;&bcy;&lcy;&icy;&kcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&iecy; &ncy;&icy; &ncy;&acy; &ocy;&dcy;&ncy;&ocy;&mcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ocy;&mcy; &kcy;&ocy;&mcy;&pcy;&softcy;&yucy;&tcy;&iecy;&rcy;&iecy;. &Pcy;&ucy;&lcy;&softcy;&tcy;&ycy; &ncy;&acy;&scy;&tcy;&rcy;&acy;&icy;&vcy;&acy;&yucy;&tcy;&scy;&yacy; &vcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy; &kcy;&acy;&kcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &vcy; &fcy;&acy;&jcy;&lcy;&iecy;  <code>$GIT_DIR/config</code> .</span></p> </li> <li> <p><span data-i18n="b52f48c96fbf92646099f117aca85b299750b68953db10be594a4c3d9e27c534/51" data-source="The configuration file &lt;code&gt;$GIT_DIR/config&lt;/code&gt; in the superproject. Git only recurses into active submodules (see &amp;quot;ACTIVE SUBMODULES&amp;quot; section below)." onmousemove="i18n(this)">&Kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&ocy;&ncy;&ncy;&ycy;&jcy; &fcy;&acy;&jcy;&lcy;  <code>$GIT_DIR/config</code>  &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;.  Git  &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&khcy;&ocy;&dcy;&icy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &vcy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&iecy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; (&scy;&mcy;. &rcy;&acy;&zcy;&dcy;&iecy;&lcy;  &quot;ACTIVE SUBMODULES&quot;  &ncy;&icy;&zhcy;&iecy;).</span></p> <p><span data-i18n="37004ab71a3f60d884e7523784f81f89623c2b01531eafce4c39fd3f1df4ec42/76" data-source="If the submodule is not yet initialized, then the configuration inside the submodule does not exist yet, so where to obtain the submodule from is configured here for example." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &iecy;&shchcy;&iecy; &ncy;&iecy; &icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;, &tcy;&ocy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&icy; &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &iecy;&shchcy;&iecy; &ncy;&iecy; &scy;&ucy;&shchcy;&iecy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &zcy;&dcy;&iecy;&scy;&softcy; &ncy;&acy;&scy;&tcy;&rcy;&acy;&icy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;, &ocy;&tcy;&kcy;&ucy;&dcy;&acy; &vcy;&zcy;&yacy;&tcy;&softcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;.</span></p> </li> <li> <p><span data-i18n="876d0f9e3d292b283d9de2cb5f0e39d6462c5a9c9d04cbab4025ffd569cc990e/dc" data-source="The &lt;code&gt;.gitmodules&lt;/code&gt; file inside the superproject. A project usually uses this file to suggest defaults for the upstream collection of repositories for the mapping that is required between a submodule&amp;rsquo;s name and its path." onmousemove="i18n(this)">&Fcy;&acy;&jcy;&lcy;  <code>.gitmodules</code>  &vcy;&ncy;&ucy;&tcy;&rcy;&icy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;. &Pcy;&rcy;&ocy;&iecy;&kcy;&tcy; &ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ucy;&iecy;&tcy; &ecy;&tcy;&ocy;&tcy; &fcy;&acy;&jcy;&lcy;, &chcy;&tcy;&ocy;&bcy;&ycy; &pcy;&rcy;&iecy;&dcy;&lcy;&ocy;&zhcy;&icy;&tcy;&softcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &dcy;&lcy;&yacy; &vcy;&ycy;&shcy;&iecy;&scy;&tcy;&ocy;&yacy;&shchcy;&iecy;&jcy; &kcy;&ocy;&lcy;&lcy;&iecy;&kcy;&tscy;&icy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&iecy;&vcy; &dcy;&lcy;&yacy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&mcy;&ocy;&gcy;&ocy; &scy;&ocy;&pcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &mcy;&iecy;&zhcy;&dcy;&ucy; &icy;&mcy;&iecy;&ncy;&iecy;&mcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &icy; &iecy;&gcy;&ocy; &pcy;&ucy;&tcy;&iecy;&mcy;.</span></p> <p><span data-i18n="6d72e40dd93ec9ac6e0b3d49ad0d90b00fd86236f47de29f96c32dd93daf0901/e4" data-source="This file mainly serves as the mapping between the name and path of submodules in the superproject, such that the submodule&amp;rsquo;s Git directory can be located." onmousemove="i18n(this)">&Ecy;&tcy;&ocy;&tcy; &fcy;&acy;&jcy;&lcy; &vcy; &ocy;&scy;&ncy;&ocy;&vcy;&ncy;&ocy;&mcy; &scy;&lcy;&ucy;&zhcy;&icy;&tcy; &dcy;&lcy;&yacy; &scy;&ocy;&pcy;&ocy;&scy;&tcy;&acy;&vcy;&lcy;&iecy;&ncy;&icy;&yacy; &icy;&mcy;&iecy;&ncy;&icy; &icy; &pcy;&ucy;&tcy;&icy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;, &tcy;&acy;&kcy; &chcy;&tcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ncy;&acy;&jcy;&tcy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;.</span></p> <p><span data-i18n="8d8923d7fe40fccb702d8c969be41f33fc2df44e4b702d404535a41fb8180799/23" data-source="If the submodule has never been initialized, this is the only place where submodule configuration is found. It serves as the last fallback to specify where to obtain the submodule from." onmousemove="i18n(this)">&IEcy;&scy;&lcy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &ncy;&icy;&kcy;&ocy;&gcy;&dcy;&acy; &ncy;&iecy; &icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&lcy;&scy;&yacy;, &ecy;&tcy;&ocy; &iecy;&dcy;&icy;&ncy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;&iecy; &mcy;&iecy;&scy;&tcy;&ocy;, &gcy;&dcy;&iecy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ncy;&acy;&jcy;&tcy;&icy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&ucy;&rcy;&acy;&tscy;&icy;&yucy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;. &Ocy;&ncy; &scy;&lcy;&ucy;&zhcy;&icy;&tcy; &pcy;&ocy;&scy;&lcy;&iecy;&dcy;&ncy;&icy;&mcy; &zcy;&acy;&pcy;&acy;&scy;&ncy;&ycy;&mcy; &vcy;&acy;&rcy;&icy;&acy;&ncy;&tcy;&ocy;&mcy;, &pcy;&ocy;&zcy;&vcy;&ocy;&lcy;&yacy;&yucy;&shchcy;&icy;&mcy; &ucy;&kcy;&acy;&zcy;&acy;&tcy;&softcy;, &ocy;&tcy;&kcy;&ucy;&dcy;&acy; &pcy;&ocy;&lcy;&ucy;&chcy;&icy;&tcy;&softcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;.</span></p> </li> </ul> </div> </div> <h2 class="text-body-emphasis"  id="_forms"><span data-i18n="858451263b1b9b4125fd9fb9a40f5959543162e04a14aec2712a45882f2d6e54/b1" data-source="Forms" onmousemove="i18n(this)">Forms</span></h2> <div> <p><span data-i18n="6524060e1f439d2cf5f5a46a6b1f3742944a15a35fe06452a67098da4b760a6e/17" data-source="Submodules can take the following forms:" onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &mcy;&ocy;&gcy;&ucy;&tcy; &pcy;&rcy;&icy;&ncy;&icy;&mcy;&acy;&tcy;&softcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&icy;&iecy; &fcy;&ocy;&rcy;&mcy;&ycy;:</span></p> <div> <ul> <li> <p><span data-i18n="dfbadcd7bc9d39691d05cd0c754160af5e998cc37f9cf87ae7119f0af80fe0f0/5c" data-source="The basic form described in DESCRIPTION with a Git directory, a working directory, a &lt;code&gt;gitlink&lt;/code&gt;, and a &lt;code&gt;.gitmodules&lt;/code&gt; entry." onmousemove="i18n(this)">&Bcy;&acy;&zcy;&ocy;&vcy;&acy;&yacy; &fcy;&ocy;&rcy;&mcy;&acy;, &ocy;&pcy;&icy;&scy;&acy;&ncy;&ncy;&acy;&yacy; &vcy; &Ocy;&Pcy;&Icy;&Scy;&Acy;&Ncy;&Icy;&IEcy;, &scy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&mcy;  Git , &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&mcy;, &zcy;&acy;&pcy;&icy;&scy;&softcy;&yucy;  <code>gitlink</code>  &icy; &zcy;&acy;&pcy;&icy;&scy;&softcy;&yucy;  <code>.gitmodules</code> .</span></p> </li> <li> <p><span data-i18n="420dfde104037136d13e122025d909ba5da41ffc0137df76ab49e7dfa46ea074/ff" data-source="&amp;quot;Old-form&amp;quot; submodule: A working directory with an embedded &lt;code&gt;.git&lt;/code&gt; directory, and the tracking &lt;code&gt;gitlink&lt;/code&gt; and &lt;code&gt;.gitmodules&lt;/code&gt; entry in the superproject. This is typically found in repositories generated using older versions of Git." onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;  &quot;Old-form&quot; : &rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &scy;&ocy; &vcy;&scy;&tcy;&rcy;&ocy;&iecy;&ncy;&ncy;&ycy;&mcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&ocy;&mcy;  <code>.git</code>  &icy; &zcy;&acy;&pcy;&icy;&scy;&softcy;&yucy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy;  <code>gitlink</code>  &icy;  <code>.gitmodules</code>  &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;. &Ocy;&bcy;&ycy;&chcy;&ncy;&ocy; &ecy;&tcy;&ocy; &vcy;&scy;&tcy;&rcy;&iecy;&chcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;&khcy;, &scy;&ocy;&zcy;&dcy;&acy;&ncy;&ncy;&ycy;&khcy; &scy; &icy;&scy;&pcy;&ocy;&lcy;&softcy;&zcy;&ocy;&vcy;&acy;&ncy;&icy;&iecy;&mcy; &scy;&tcy;&acy;&rcy;&ycy;&khcy; &vcy;&iecy;&rcy;&scy;&icy;&jcy; Git.</span></p> <p><span data-i18n="b106c8898c6450c1548860b457bdfc836fd6fe8b6a68f6a00a70cd2802bc3f35/e0" data-source="It is possible to construct these old form repositories manually." onmousemove="i18n(this)">&Ecy;&tcy;&icy; &scy;&tcy;&acy;&rcy;&ycy;&iecy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&icy; &fcy;&ocy;&rcy;&mcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &scy;&ocy;&zcy;&dcy;&acy;&tcy;&softcy; &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;.</span></p> <p><span data-i18n="25e031d0eb3b86a8d581716ca57afd959c928c57c588c422d222c61a29b93f08/9a" data-source="When deinitialized or deleted (see below), the submodule&amp;rsquo;s Git directory is automatically moved to &lt;code&gt;$GIT_DIR/modules/&amp;lt;name&amp;gt;/&lt;/code&gt; of the superproject." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &dcy;&iecy;&icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&acy;&tscy;&icy;&icy; &icy;&lcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&icy; (&scy;&mcy;. &ncy;&icy;&zhcy;&iecy;) &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &acy;&vcy;&tcy;&ocy;&mcy;&acy;&tcy;&icy;&chcy;&iecy;&scy;&kcy;&icy; &pcy;&iecy;&rcy;&iecy;&mcy;&iecy;&shchcy;&acy;&iecy;&tcy;&scy;&yacy; &vcy;  <code>$GIT_DIR/modules/&lt;name&gt;/</code>  &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;.</span></p> </li> <li> <p><span data-i18n="61c83871f3e71de2bcfd59650a0bbd4d29750d7b34ac05781da9961ad38d1e8d/94" data-source="Deinitialized submodule: A &lt;code&gt;gitlink&lt;/code&gt;, and a &lt;code&gt;.gitmodules&lt;/code&gt; entry, but no submodule working directory. The submodule&amp;rsquo;s Git directory may be there as after deinitializing the Git directory is kept around. The directory which is supposed to be the working directory is empty instead." onmousemove="i18n(this)">&Dcy;&iecy;&icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&ncy;&ycy;&jcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;:  <code>gitlink</code>  &icy; &zcy;&acy;&pcy;&icy;&scy;&softcy;  <code>.gitmodules</code> , &ncy;&ocy; &ncy;&iecy;&tcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;. &Kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &mcy;&ocy;&zhcy;&iecy;&tcy; &ncy;&acy;&khcy;&ocy;&dcy;&icy;&tcy;&softcy;&scy;&yacy; &tcy;&acy;&mcy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; &pcy;&ocy;&scy;&lcy;&iecy; &dcy;&iecy;&icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&acy;&tscy;&icy;&icy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&iecy;&tcy;&scy;&yacy;. &Vcy;&mcy;&iecy;&scy;&tcy;&ocy; &ecy;&tcy;&ocy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&jcy; &dcy;&ocy;&lcy;&zhcy;&iecy;&ncy; &bcy;&ycy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&icy;&mcy;, &pcy;&ucy;&scy;&tcy;.</span></p> <p><span data-i18n="dd9e5185e45f34197b8f98362ebfc4fe6b38a6c3f3fd8483e8c0af54fb3d55ba/b5" data-source="A submodule can be deinitialized by running &lt;code&gt;git submodule deinit&lt;/code&gt;. Besides emptying the working directory, this command only modifies the superproject&amp;rsquo;s &lt;code&gt;$GIT_DIR/config&lt;/code&gt; file, so the superproject&amp;rsquo;s history is not affected. This can be undone using &lt;code&gt;git submodule init&lt;/code&gt;." onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &dcy;&iecy;&icy;&ncy;&icy;&tscy;&icy;&acy;&lcy;&icy;&zcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git submodule deinit</code> . &Pcy;&ocy;&mcy;&icy;&mcy;&ocy; &ocy;&chcy;&icy;&scy;&tcy;&kcy;&icy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&gcy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;&acy;, &ecy;&tcy;&acy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&acy; &icy;&zcy;&mcy;&iecy;&ncy;&yacy;&iecy;&tcy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &fcy;&acy;&jcy;&lcy;  <code>$GIT_DIR/config</code>  &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, &pcy;&ocy;&ecy;&tcy;&ocy;&mcy;&ucy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&yacy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy; &ncy;&iecy; &zcy;&acy;&tcy;&rcy;&acy;&gcy;&icy;&vcy;&acy;&iecy;&tcy;&scy;&yacy;. &Ecy;&tcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ocy;&tcy;&mcy;&iecy;&ncy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git submodule init</code> .</span></p> </li> <li> <p><span data-i18n="fb5783847d0f966c12b5045798c4848147830791ebb12bf3069e71abd7c96cc0/6c" data-source="Deleted submodule: A submodule can be deleted by running &lt;code&gt;git rm &amp;lt;submodule path&amp;gt; &amp;amp;&amp;amp; git commit&lt;/code&gt;. This can be undone using &lt;code&gt;git revert&lt;/code&gt;." onmousemove="i18n(this)">&Ucy;&dcy;&acy;&lcy;&iecy;&ncy;&ncy;&ycy;&jcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;: &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy;, &zcy;&acy;&pcy;&ucy;&scy;&tcy;&icy;&vcy;  <code>git rm &lt;submodule path&gt; &amp;&amp; git commit</code>  . &Ecy;&tcy;&ocy; &mcy;&ocy;&zhcy;&ncy;&ocy; &ocy;&tcy;&mcy;&iecy;&ncy;&icy;&tcy;&softcy; &scy; &pcy;&ocy;&mcy;&ocy;&shchcy;&softcy;&yucy;  <code>git revert</code> .</span></p> <p><span data-i18n="09ee8803ea9a39da7201bc8efc023622f7878825e5d9f2fc50fa2820d5170fac/a6" data-source="The deletion removes the superproject&amp;rsquo;s tracking data, which are both the &lt;code&gt;gitlink&lt;/code&gt; entry and the section in the &lt;code&gt;.gitmodules&lt;/code&gt; file. The submodule&amp;rsquo;s working directory is removed from the file system, but the Git directory is kept around as it to make it possible to checkout past commits without requiring fetching from another repository." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&icy; &ucy;&dcy;&acy;&lcy;&yacy;&yucy;&tcy;&scy;&yacy; &dcy;&acy;&ncy;&ncy;&ycy;&iecy; &ocy;&tcy;&scy;&lcy;&iecy;&zhcy;&icy;&vcy;&acy;&ncy;&icy;&yacy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&acy;, &kcy;&ocy;&tcy;&ocy;&rcy;&ycy;&iecy; &pcy;&rcy;&iecy;&dcy;&scy;&tcy;&acy;&vcy;&lcy;&yacy;&yucy;&tcy; &scy;&ocy;&bcy;&ocy;&jcy; &kcy;&acy;&kcy; &zcy;&acy;&pcy;&icy;&scy;&softcy;  <code>gitlink</code> , &tcy;&acy;&kcy; &icy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy; &vcy; &fcy;&acy;&jcy;&lcy;&iecy;  <code>.gitmodules</code> . &Rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &ucy;&dcy;&acy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy;&zcy; &fcy;&acy;&jcy;&lcy;&ocy;&vcy;&ocy;&jcy; &scy;&icy;&scy;&tcy;&iecy;&mcy;&ycy;, &ncy;&ocy; &kcy;&acy;&tcy;&acy;&lcy;&ocy;&gcy;  Git  &scy;&ocy;&khcy;&rcy;&acy;&ncy;&yacy;&iecy;&tcy;&scy;&yacy;, &chcy;&tcy;&ocy;&bcy;&ycy; &mcy;&ocy;&zhcy;&ncy;&ocy; &bcy;&ycy;&lcy;&ocy; &icy;&zcy;&vcy;&lcy;&iecy;&kcy;&acy;&tcy;&softcy; &pcy;&rcy;&iecy;&dcy;&ycy;&dcy;&ucy;&shchcy;&icy;&iecy; &kcy;&ocy;&mcy;&mcy;&icy;&tcy;&ycy; &bcy;&iecy;&zcy; &ncy;&iecy;&ocy;&bcy;&khcy;&ocy;&dcy;&icy;&mcy;&ocy;&scy;&tcy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&yacy; &icy;&zcy; &dcy;&rcy;&ucy;&gcy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;.</span></p> <p><span data-i18n="9aeec50563926384f934d48c1d32475d0e6eb93e9dc376f07ac40f1070da3208/b3" data-source="To completely remove a submodule, manually delete &lt;code&gt;$GIT_DIR/modules/&amp;lt;name&amp;gt;/&lt;/code&gt;." onmousemove="i18n(this)">&CHcy;&tcy;&ocy;&bcy;&ycy; &pcy;&ocy;&lcy;&ncy;&ocy;&scy;&tcy;&softcy;&yucy; &ucy;&dcy;&acy;&lcy;&icy;&tcy;&softcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;, &ucy;&dcy;&acy;&lcy;&icy;&tcy;&iecy;  <code>$GIT_DIR/modules/&lt;name&gt;/</code>  &vcy;&rcy;&ucy;&chcy;&ncy;&ucy;&yucy;.</span></p> </li> </ul> </div> </div> <h2 class="text-body-emphasis"  id="_active_submodules"><span data-i18n="872bc30721ce538186e9c7d15c4b593cdb510cff9b7a7f7bb5cd44a08e517f18/b0" data-source="Active submodules" onmousemove="i18n(this)">Active submodules</span></h2> <div> <p><span data-i18n="716ff74c632587075b25f6a240853085f8b5afee831132b181ba623ce14f14eb/1d" data-source="A submodule is considered active," onmousemove="i18n(this)">&Scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &scy;&chcy;&icy;&tcy;&acy;&iecy;&tcy;&scy;&yacy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy;&mcy;,</span></p> <div> <ol> <li> <p><span data-i18n="8c4fd94a6510c14142272ee30f34754e0c226b1eb429128e672f4615ac065b32/cd" data-source="if &lt;code&gt;submodule.&amp;lt;name&amp;gt;.active&lt;/code&gt; is set to &lt;code&gt;true&lt;/code&gt;" onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &dcy;&lcy;&yacy;  <code>submodule.&lt;name&gt;.active</code>  &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ocy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;  <code>true</code></span></p> <p><span data-i18n="7175517a370b5cd2e664e3fd29c4ea9db5ce17058eb9772fe090a5485e49dad6/33" data-source="or" onmousemove="i18n(this)">or</span></p> </li> <li> <p><span data-i18n="2571be8d64df2ea79c54e1e35cbfb1a380dca655d916aa7c203838e6dd4bcc10/bd" data-source="if the submodule&amp;rsquo;s path matches the pathspec in &lt;code&gt;submodule.active&lt;/code&gt;" onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &pcy;&ucy;&tcy;&softcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy; &pcy;&ucy;&tcy;&icy; &vcy;  <code>submodule.active</code></span></p> <p><span data-i18n="7175517a370b5cd2e664e3fd29c4ea9db5ce17058eb9772fe090a5485e49dad6/33" data-source="or" onmousemove="i18n(this)">or</span></p> </li> <li> <p><span data-i18n="d1190b251ae312fbdb312361255c262dbc631e82d29c2769a7b3300df5b65443/0e" data-source="if &lt;code&gt;submodule.&amp;lt;name&amp;gt;.url&lt;/code&gt; is set." onmousemove="i18n(this)">&iecy;&scy;&lcy;&icy; &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;  <code>submodule.&lt;name&gt;.url</code> .</span></p> </li> </ol> </div> <p><span data-i18n="1672bbef4cc4291f8ab96b422619414bd35d5236239921ae39509b5a8c7c3174/f4" data-source="and these are evaluated in this order." onmousemove="i18n(this)">&icy; &ocy;&ncy;&icy; &ocy;&tscy;&iecy;&ncy;&icy;&vcy;&acy;&yucy;&tcy;&scy;&yacy; &vcy; &ecy;&tcy;&ocy;&mcy; &pcy;&ocy;&rcy;&yacy;&dcy;&kcy;&iecy;.</span></p> <p><span data-i18n="652744a2ab28954bbafd780fd76c15c2bd557594532f907f10ead1989727af95/0f" data-source="For example:" onmousemove="i18n(this)">For example:</span></p> <div> <div> <pre class="hljs language-ini"><span class="hljs-section">[submodule &quot;foo&quot;]</span>
  <span class="hljs-attr">active</span> = <span class="hljs-literal">false</span>
  <span class="hljs-attr">url</span> = https://example.org/foo
<span class="hljs-section">[submodule &quot;bar&quot;]</span>
  <span class="hljs-attr">active</span> = <span class="hljs-literal">true</span>
  <span class="hljs-attr">url</span> = https://example.org/bar
<span class="hljs-section">[submodule &quot;baz&quot;]</span>
  <span class="hljs-attr">url</span> = https://example.org/baz</pre> </div> </div> <p><span data-i18n="e69c6ce29a29915bd40382135e55c01ddf4eaa655a4d6e3acc575d09395ed852/d9" data-source="In the above config only the submodules &lt;code&gt;bar&lt;/code&gt; and &lt;code&gt;baz&lt;/code&gt; are active, &lt;code&gt;bar&lt;/code&gt; due to (1) and &lt;code&gt;baz&lt;/code&gt; due to (3). &lt;code&gt;foo&lt;/code&gt; is inactive because (1) takes precedence over (3)" onmousemove="i18n(this)">&Vcy; &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ocy;&mcy; &vcy;&ycy;&shcy;&iecy; &kcy;&ocy;&ncy;&fcy;&icy;&gcy;&iecy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy; &tcy;&ocy;&lcy;&softcy;&kcy;&ocy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;  <code>bar</code>  &icy;  <code>baz</code> ,  <code>bar</code>  &icy;&zcy;-&zcy;&acy; (1) &icy;  <code>baz</code>  &icy;&zcy;-&zcy;&acy; (3).  <code>foo</code>  &ncy;&iecy;&acy;&kcy;&tcy;&icy;&vcy;&iecy;&ncy;, &pcy;&ocy;&scy;&kcy;&ocy;&lcy;&softcy;&kcy;&ucy; (1) &icy;&mcy;&iecy;&iecy;&tcy; &pcy;&rcy;&icy;&ocy;&rcy;&icy;&tcy;&iecy;&tcy; &ncy;&acy;&dcy; (3).</span></p> <p><span data-i18n="b655f08d7a509a8f10cd5ce8fa5ea553f1c3dc865ae4481cd8fe075eb6b8d6c7/63" data-source="Note that (3) is a historical artefact and will be ignored if the (1) and (2) specify that the submodule is not active. In other words, if we have a &lt;code&gt;submodule.&amp;lt;name&amp;gt;.active&lt;/code&gt; set to &lt;code&gt;false&lt;/code&gt; or if the submodule&amp;rsquo;s path is excluded in the pathspec in &lt;code&gt;submodule.active&lt;/code&gt;, the url doesn&amp;rsquo;t matter whether it is present or not. This is illustrated in the example that follows." onmousemove="i18n(this)">&Ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy; (3) &yacy;&vcy;&lcy;&yacy;&iecy;&tcy;&scy;&yacy; &icy;&scy;&tcy;&ocy;&rcy;&icy;&chcy;&iecy;&scy;&kcy;&icy;&mcy; &acy;&rcy;&tcy;&iecy;&fcy;&acy;&kcy;&tcy;&ocy;&mcy; &icy; &bcy;&ucy;&dcy;&iecy;&tcy; &icy;&gcy;&ncy;&ocy;&rcy;&icy;&rcy;&ocy;&vcy;&acy;&tcy;&softcy;&scy;&yacy;, &iecy;&scy;&lcy;&icy; (1) &icy; (2) &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&yucy;&tcy;, &chcy;&tcy;&ocy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy; &ncy;&iecy; &acy;&kcy;&tcy;&icy;&vcy;&iecy;&ncy;. &Dcy;&rcy;&ucy;&gcy;&icy;&mcy;&icy; &scy;&lcy;&ocy;&vcy;&acy;&mcy;&icy;, &iecy;&scy;&lcy;&icy; &dcy;&lcy;&yacy;  <code>submodule.&lt;name&gt;.active</code>  &ucy;&scy;&tcy;&acy;&ncy;&ocy;&vcy;&lcy;&iecy;&ncy;&ocy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&iecy;  <code>false</code>  &icy;&lcy;&icy; &iecy;&scy;&lcy;&icy; &pcy;&ucy;&tcy;&softcy; &kcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yucy; &icy;&scy;&kcy;&lcy;&yucy;&chcy;&iecy;&ncy; &icy;&zcy; &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy; &pcy;&ucy;&tcy;&icy; &vcy;  <code>submodule.active</code> , URL-&acy;&dcy;&rcy;&iecy;&scy; &ncy;&iecy; &icy;&mcy;&iecy;&iecy;&tcy; &zcy;&ncy;&acy;&chcy;&iecy;&ncy;&icy;&yacy;, &pcy;&rcy;&icy;&scy;&ucy;&tcy;&scy;&tcy;&vcy;&ucy;&iecy;&tcy; &ocy;&ncy; &icy;&lcy;&icy; &ncy;&iecy;&tcy;. &Ecy;&tcy;&ocy; &pcy;&ocy;&kcy;&acy;&zcy;&acy;&ncy;&ocy; &vcy; &scy;&lcy;&iecy;&dcy;&ucy;&yucy;&shchcy;&iecy;&mcy; &pcy;&rcy;&icy;&mcy;&iecy;&rcy;&iecy;.</span></p> <div> <div> <pre class="hljs language-ini"><span class="hljs-section">[submodule &quot;foo&quot;]</span>
  <span class="hljs-attr">active</span> = <span class="hljs-literal">true</span>
  <span class="hljs-attr">url</span> = https://example.org/foo
<span class="hljs-section">[submodule &quot;bar&quot;]</span>
  <span class="hljs-attr">url</span> = https://example.org/bar
<span class="hljs-section">[submodule &quot;baz&quot;]</span>
  <span class="hljs-attr">url</span> = https://example.org/baz
<span class="hljs-section">[submodule &quot;bob&quot;]</span>
  <span class="hljs-attr">ignore</span> = <span class="hljs-literal">true</span>
<span class="hljs-section">[submodule]</span>
  <span class="hljs-attr">active</span> = b*
  <span class="hljs-attr">active</span> = :(exclude) baz</pre> </div> </div> <p><span data-i18n="d418efcdb4a1c276eff9c739669c11ed6af6ee2df8543eb617c52930dd48ed42/10" data-source="In here all submodules except &lt;code&gt;baz&lt;/code&gt; (foo, bar, bob) are active. &lt;code&gt;foo&lt;/code&gt; due to its own active flag and all the others due to the submodule active pathspec, which specifies that any submodule starting with &lt;code&gt;b&lt;/code&gt; except &lt;code&gt;baz&lt;/code&gt; are also active, regardless of the presence of the .url field." onmousemove="i18n(this)">&Zcy;&dcy;&iecy;&scy;&softcy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ycy; &vcy;&scy;&iecy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;, &kcy;&rcy;&ocy;&mcy;&iecy;  <code>baz</code>  (foo, bar, bob).  <code>foo</code>  &icy;&zcy;-&zcy;&acy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &fcy;&lcy;&acy;&gcy;&acy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&scy;&tcy;&icy;, &acy; &vcy;&scy;&iecy; &ocy;&scy;&tcy;&acy;&lcy;&softcy;&ncy;&ycy;&iecy; &icy;&zcy;-&zcy;&acy; &scy;&pcy;&iecy;&tscy;&icy;&fcy;&icy;&kcy;&acy;&tscy;&icy;&icy; &acy;&kcy;&tcy;&icy;&vcy;&ncy;&ocy;&gcy;&ocy; &pcy;&ucy;&tcy;&icy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;, &kcy;&ocy;&tcy;&ocy;&rcy;&acy;&yacy; &ucy;&kcy;&acy;&zcy;&ycy;&vcy;&acy;&iecy;&tcy;, &chcy;&tcy;&ocy; &lcy;&yucy;&bcy;&ocy;&jcy; &scy;&ucy;&bcy;&mcy;&ocy;&dcy;&ucy;&lcy;&softcy;, &ncy;&acy;&chcy;&icy;&ncy;&acy;&yucy;&shchcy;&icy;&jcy;&scy;&yacy; &scy;  <code>b</code> , &kcy;&rcy;&ocy;&mcy;&iecy;  <code>baz</code> , &tcy;&acy;&kcy;&zhcy;&iecy; &acy;&kcy;&tcy;&icy;&vcy;&iecy;&ncy;, &ncy;&iecy;&zcy;&acy;&vcy;&icy;&scy;&icy;&mcy;&ocy; &ocy;&tcy; &ncy;&acy;&lcy;&icy;&chcy;&icy;&yacy; &pcy;&ocy;&lcy;&yacy; .url.</span></p> </div> <h2 class="text-body-emphasis"  id="_workflow_for_a_third_party_library"><span data-i18n="26364ee43981101f02ae50ee3f49b69af4bc4e21f42c915a9c1f2e794261c2ef/53" data-source="Workflow for a third party library" onmousemove="i18n(this)">&Rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy; &dcy;&lcy;&yacy; &scy;&tcy;&ocy;&rcy;&ocy;&ncy;&ncy;&iecy;&gcy;&ocy;  library</span></h2> <div> <div> <div> <pre class="hljs language-csharp"><span class="hljs-meta"># Add a submodule</span>
git submodule <span class="hljs-keyword">add</span> &lt;URL&gt; &lt;path&gt;</pre> </div> </div> <div> <div> <pre class="hljs language-sql"># Occasionally <span class="hljs-keyword">update</span> the submodule <span class="hljs-keyword">to</span> a <span class="hljs-keyword">new</span> version:
git <span class="hljs-operator">-</span>C <span class="hljs-operator">&lt;</span>path<span class="hljs-operator">&gt;</span> checkout <span class="hljs-operator">&lt;</span><span class="hljs-keyword">new</span> version<span class="hljs-operator">&gt;</span>
git <span class="hljs-keyword">add</span> <span class="hljs-operator">&lt;</span>path<span class="hljs-operator">&gt;</span>
git <span class="hljs-keyword">commit</span> <span class="hljs-operator">-</span>m &quot;update submodule to new version&quot;</pre> </div> </div> <div> <div> <pre class="hljs language-bash"><span class="hljs-comment" title="# See the list of submodules in a superproject"># &Pcy;&ocy;&scy;&mcy;&ocy;&tcy;&rcy;&iecy;&tcy;&softcy; &scy;&pcy;&icy;&scy;&ocy;&kcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy; &vcy; &scy;&ucy;&pcy;&iecy;&rcy;&pcy;&rcy;&ocy;&iecy;&kcy;&tcy;&iecy;</span>
git submodule status</pre> </div> </div> <div> <div> <pre class="hljs language-graphql"><span class="hljs-comment" title="# See FORMS on removing submodules"># &Scy;&mcy;. FORMS &ocy;&bcy; &ucy;&dcy;&acy;&lcy;&iecy;&ncy;&icy;&icy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&iecy;&jcy;.</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_workflow_for_an_artificially_split_repo"><span data-i18n="c543c7cbab2f9695bc5e4e5843ea71f259395fa984ba76b551575bedad963d48/c3" data-source="Workflow for an artificially split repo" onmousemove="i18n(this)">&Rcy;&acy;&bcy;&ocy;&chcy;&icy;&jcy; &pcy;&rcy;&ocy;&tscy;&iecy;&scy;&scy; &dcy;&lcy;&yacy; &icy;&scy;&kcy;&ucy;&scy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ocy; &rcy;&acy;&zcy;&dcy;&iecy;&lcy;&iecy;&ncy;&ncy;&ocy;&gcy;&ocy; &rcy;&iecy;&pcy;&ocy;</span></h2> <div> <div> <div> <pre class="hljs language-php"><span class="hljs-comment" title="# Enable recursion for relevant commands, such that"># &Vcy;&kcy;&lcy;&yucy;&chcy;&icy;&tcy;&iecy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&yucy; &dcy;&lcy;&yacy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&icy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;, &ncy;&acy;&pcy;&rcy;&icy;&mcy;&iecy;&rcy;</span>
<span class="hljs-comment" title="# regular commands recurse into submodules by default"># &ocy;&bcy;&ycy;&chcy;&ncy;&ycy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&khcy;&ocy;&dcy;&yacy;&tcy; &vcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;</span>
git config --<span class="hljs-keyword">global</span> submodule.recurse <span class="hljs-literal">true</span></pre> </div> </div> <div> <div> <pre class="hljs language-bash"><span class="hljs-comment" title="# Unlike most other commands below, clone still needs"># &Vcy; &ocy;&tcy;&lcy;&icy;&chcy;&icy;&iecy; &ocy;&tcy; &bcy;&ocy;&lcy;&softcy;&shcy;&icy;&ncy;&scy;&tcy;&vcy;&acy; &dcy;&rcy;&ucy;&gcy;&icy;&khcy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;, &pcy;&rcy;&icy;&vcy;&iecy;&dcy;&iecy;&ncy;&ncy;&ycy;&khcy; &ncy;&icy;&zhcy;&iecy;, &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&yucy; &pcy;&ocy;-&pcy;&rcy;&iecy;&zhcy;&ncy;&iecy;&mcy;&ucy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;&scy;&yacy;</span>
<span class="hljs-comment" title="# its own recurse flag:"># &scy;&vcy;&ocy;&jcy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&jcy; &fcy;&lcy;&acy;&gcy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&icy;:</span>
git <span class="hljs-built_in">clone</span> --recurse &lt;URL&gt; &lt;directory&gt;
<span class="hljs-built_in">cd</span> &lt;directory&gt;</pre> </div> </div> <div> <div> <pre class="hljs language-perl"><span class="hljs-comment" title="# Get to know the code:"># &Zcy;&ncy;&acy;&kcy;&ocy;&mcy;&icy;&mcy;&scy;&yacy; &scy; &kcy;&ocy;&dcy;&ocy;&mcy;:</span>
git <span class="hljs-keyword">grep</span> foo
git ls-files --recurse-submodules</pre> </div> </div> <div> <div class="table-responsive"><table class="table"> <tr> <td> <div><span data-i18n="d8da2c49df39d91df7ecd199b92da7bf264f026242ccc69b08daeadfe587c45b/a2" data-source="Note" onmousemove="i18n(this)">Note</span></div> </td> <td> <span data-i18n="44fb7b86d88360adf3a0933f6a49efc1d5882ecc223f4765e2d99ca4c6564e09/63" data-source="&lt;code&gt;git ls-files&lt;/code&gt; also requires its own &lt;code&gt;--recurse-submodules&lt;/code&gt; flag." onmousemove="i18n(this)">&Dcy;&lcy;&yacy;  <code>git ls-files</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &tcy;&rcy;&iecy;&bcy;&ucy;&iecy;&tcy;&scy;&yacy; &scy;&ocy;&bcy;&scy;&tcy;&vcy;&iecy;&ncy;&ncy;&ycy;&jcy; &fcy;&lcy;&acy;&gcy;  <code>--recurse-submodules</code> .</span></td> </tr> </table></div> </div> <div> <div> <pre class="hljs language-sql"># <span class="hljs-keyword">Get</span> <span class="hljs-keyword">new</span> code
git <span class="hljs-keyword">fetch</span>
git pull <span class="hljs-comment">--rebase</span></pre> </div> </div> <div> <div> <pre class="hljs language-perl"><span class="hljs-comment" title="# Change worktree"># &Icy;&zcy;&mcy;&iecy;&ncy;&icy;&tcy;&softcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&iecy; &dcy;&iecy;&rcy;&iecy;&vcy;&ocy;</span>
git checkout
git <span class="hljs-keyword">reset</span></pre> </div> </div> </div> <h2 class="text-body-emphasis"  id="_implementation_details"><span data-i18n="370cf2dc684fe3607ba96a026729ede5cfd02d3ce228dc2b16cc4c513d24d450/5a" data-source="Implementation details" onmousemove="i18n(this)">Implementation details</span></h2> <div> <p><span data-i18n="9698ecab5164c5a833e478055d9c5a806cff33b6a3a0561b6e8ff7bdacd1a152/82" data-source="When cloning or pulling a repository containing submodules the submodules will not be checked out by default; you can instruct &lt;code&gt;clone&lt;/code&gt; to recurse into submodules. The &lt;code&gt;init&lt;/code&gt; and &lt;code&gt;update&lt;/code&gt; subcommands of &lt;code&gt;git submodule&lt;/code&gt; will maintain submodules checked out and at an appropriate revision in your working tree. Alternatively you can set &lt;code&gt;submodule.recurse&lt;/code&gt; to have &lt;code&gt;checkout&lt;/code&gt; recurse into submodules (note that &lt;code&gt;submodule.recurse&lt;/code&gt; also affects other Git commands, see &lt;a href=&quot;git-config&quot;&gt;git-config[1]&lt;/a&gt; for a complete list)." onmousemove="i18n(this)">&Pcy;&rcy;&icy; &kcy;&lcy;&ocy;&ncy;&icy;&rcy;&ocy;&vcy;&acy;&ncy;&icy;&icy; &icy;&lcy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&icy;&icy; &rcy;&iecy;&pcy;&ocy;&zcy;&icy;&tcy;&ocy;&rcy;&icy;&yacy;, &scy;&ocy;&dcy;&iecy;&rcy;&zhcy;&acy;&shchcy;&iecy;&gcy;&ocy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy;, &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &ncy;&iecy; &bcy;&ucy;&dcy;&ucy;&tcy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ycy; &pcy;&ocy; &ucy;&mcy;&ocy;&lcy;&chcy;&acy;&ncy;&icy;&yucy;; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &pcy;&ocy;&rcy;&ucy;&chcy;&icy;&tcy;&softcy;  <code>clone</code>  &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&vcy;&ncy;&ocy; &pcy;&iecy;&rcy;&iecy;&jcy;&tcy;&icy; &kcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&yacy;&mcy;. &Scy;&ucy;&bcy;&kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>init</code>  &icy;  <code>update</code>  &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  <code>git submodule</code>  &bcy;&ucy;&dcy;&ucy;&tcy; &pcy;&ocy;&dcy;&dcy;&iecy;&rcy;&zhcy;&icy;&vcy;&acy;&tcy;&softcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; &icy;&zcy;&vcy;&lcy;&iecy;&chcy;&iecy;&ncy;&ncy;&ycy;&mcy;&icy; &icy; &icy;&mcy;&iecy;&tcy;&softcy; &scy;&ocy;&ocy;&tcy;&vcy;&iecy;&tcy;&scy;&tcy;&vcy;&ucy;&yucy;&shchcy;&ucy;&yucy; &rcy;&iecy;&dcy;&acy;&kcy;&tscy;&icy;&yucy; &vcy; &vcy;&acy;&shcy;&iecy;&mcy; &rcy;&acy;&bcy;&ocy;&chcy;&iecy;&mcy; &dcy;&iecy;&rcy;&iecy;&vcy;&iecy;. &Acy;&lcy;&softcy;&tcy;&iecy;&rcy;&ncy;&acy;&tcy;&icy;&vcy;&ncy;&ocy; &vcy;&ycy; &mcy;&ocy;&zhcy;&iecy;&tcy;&iecy; &ncy;&acy;&scy;&tcy;&rcy;&ocy;&icy;&tcy;&softcy;  <code>submodule.recurse</code>  &ncy;&acy; &rcy;&iecy;&kcy;&ucy;&rcy;&scy;&icy;&yucy;  <code>checkout</code>  &vcy; &pcy;&ocy;&dcy;&mcy;&ocy;&dcy;&ucy;&lcy;&icy; (&ocy;&bcy;&rcy;&acy;&tcy;&icy;&tcy;&iecy; &vcy;&ncy;&icy;&mcy;&acy;&ncy;&icy;&iecy;, &chcy;&tcy;&ocy;  <code>submodule.recurse</code>  &tcy;&acy;&kcy;&zhcy;&iecy; &vcy;&lcy;&icy;&yacy;&iecy;&tcy; &ncy;&acy; &dcy;&rcy;&ucy;&gcy;&icy;&iecy; &kcy;&ocy;&mcy;&acy;&ncy;&dcy;&ycy;  Git , &pcy;&ocy;&lcy;&ncy;&ycy;&jcy; &scy;&pcy;&icy;&scy;&ocy;&kcy; &scy;&mcy;. &vcy;  <a href="git-config.html">git-config[1]</a> ).</span></p> </div> <h2 class="text-body-emphasis"  id="_see_also"><span data-i18n="2fa97693b70fa87b95b2d1bdf9558e4ac65d5e82d145f13a03849c4d9c4957a9/40" data-source="See also" onmousemove="i18n(this)">See also</span></h2> <div> <p><span data-i18n="bdc2599813d3a88d34791e0daeff0826d935cec251a5df988f772206b2395264/d5" data-source="&lt;a href=&quot;git-submodule&quot;&gt;git-submodule[1]&lt;/a&gt;, &lt;a href=&quot;gitmodules&quot;&gt;gitmodules[5]&lt;/a&gt;." onmousemove="i18n(this)"><a href="git-submodule.html">git-submodule[1]</a>, <a href="gitmodules.html">gitmodules[5]</a>.</span></p> </div><address>
<p>
    &copy; 2012&ndash;2024 Scott Chacon and others<br/>Licensed under the MIT License.<br/>
<a href="https://git-scm.com/docs/gitsubmodules">https://git-scm.com/docs/gitsubmodules</a>
</p>
</address>                </article>
            </main>

            <br>
            <br>
            <hr>

                               <ins class="adsbygoogle"
        style="display:block"
        data-ad-format="autorelaxed"
        data-ad-client="ca-pub-6424571640879890"
        data-ad-slot="7867651344"></ins>
   <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
   </script>            
        </div>

        <!-- -->

        <div class="col-md-3">
            <br>
            <form action="-index-.html">
                <div class="input-group">
                    <input class="form-control" type="search" name="q" placeholder="Search for Git" required>
                    <button class="btn btn-primary" type="submit">
                        <i class="bi bi-search"></i>
                    </button>
                </div>
            </form>
            <br>

                            <div class="list-group list-group-flush">
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gittutorial.html">
                            gittutorial                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gittutorial-2.html">
                            gittutorial 2                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitweb.html">
                            gitweb                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitweb.conf.html">
                            gitweb.conf                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="gitworkflows.html">
                            gitworkflows                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="howto-index.html">
                            howto index                        </a>
                                            <a class="list-group-item list-group-item-action text-primary-emphasis px-2 text-truncate" href="multi-pack-index.html">
                            multi pack-index                        </a>
                                    </div>
            
            <br>
            <div class="my-3">
                <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-6424571640879890"
     data-ad-slot="3954319254"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>            </div>
            <br>

            
            
        </div>
    </div>
</div>    <!--/sse-->

    <footer>
        <br>
        <div class="container">
            <div class="row">
                <div class="col">
                    <hr>
                    <div class="row">
                        <div class="col-md-10">
                            <ul class="nav">
                                <li class="nav-item">
                                    <a class="nav-link ps-0" href="https://runebook.dev/">Help us Improve Translation</a>
                                </li>
                                                            </ul>
                        </div>
                        <div class="col-md-2 text-end">
                            <a href="gitsubmodules.html#" class="fs-5" aria-label="Top">
                                <i class="bi bi-arrow-up-square-fill"></i>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <br>
    </footer>
    <script src="../../../runebook.js"></script>
</body>

</html>